﻿using System;

namespace BalanceManagerApp.Model
{
    public class FlowFundsItem
    {
        public int Id { get; set; }
        public Item Item { get; set; }

        decimal incomeAmount;
        public decimal IncomeAmount
        {
            get
            {
                return this.incomeAmount;
            }
            set
            {
                if (value <= 0)
                    throw new ArgumentException("Параметр IncomeAmount должен быть больше нуля.", "IncomeAmount");
                this.incomeAmount = value;
            }
        }

        decimal expenseAmount;
        public decimal ExpenseAmount { 
            get
            {
                return this.expenseAmount;
            }
            set
            {
                if (value <= 0)
                    throw new ArgumentException("Параметр ExpenseAmount должен быть больше нуля.", "IncomeAmount");
                this.expenseAmount = value;
            }
        }

        public DateTime Date { get; set; }
    }
}
